/*******************************************************************
 * 
 * @Version : 0.5 
 *
 * GameAction.java 
 *
 * 2011-10-14 下午12:19:23
 *
 *******************************************************************/
package game.breeze.resource;

import game.breeze.constants.ActionType;

import java.util.ArrayList;
import java.util.List;

/**
 * Class desc there
 * 
 * @author yangwei ywengineer@gmail.com
 * 
 */
public abstract class GameAction {
	protected int id;
	protected ActionType type;
	protected List<GameAction> actions;
	protected List<GameEvent> events;

	/**
	 * 
	 */
	public GameAction() {
		events = new ArrayList<GameEvent>();
		actions = new ArrayList<GameAction>();
	}

	/**
	 * @return the event
	 */
	public List<GameEvent> getEvents() {
		return events;
	}

	/**
	 * @param event
	 *            the event to set
	 */
	public void addEvent(GameEvent event) {
		this.events.add(event);
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the type
	 */
	public ActionType getType() {
		return type;
	}

	/**
	 * @return the actions
	 */
	public List<GameAction> getActions() {
		return actions;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(ActionType type) {
		this.type = type;
	}

	/**
	 * @param actions
	 *            the actions to set
	 */
	public void addAction(GameAction a) {
		this.actions.add(a);
	}
}
